package com.zcmyth.tree;

import com.zcmyth.tree.BinaryTree.Node;

public interface TreeVisitor<T> {
  void visit(T e);
  
  public static final TreeVisitor<Node<?>> PRINTER = new TreeVisitor<Node<?>> () {
    @Override
    public void visit(Node<?> e) {
      System.out.println(e.getData().toString());
    }
  };
}
